package com.itwxz.forum.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itwxz.forum.domain.po.ForumPost;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itwxz.forum.domain.vo.ForumPostListVo;
import com.itwxz.forum.domain.vo.ForumPostVo;

import java.util.List;

/**
* @author Admin
* @description 针对表【forum_post(论坛帖子表)】的数据库操作Service
* @createDate 2025-05-04 16:29:25
*/
public interface ForumPostService extends IService<ForumPost> {

    String createPost(ForumPost post);

    IPage<ForumPostListVo> getPostPageList(int pageNum, int pageSize, String query);
    IPage<ForumPostListVo> getPostPageMy(int pageNum, int pageSize);
    IPage<ForumPostListVo> getPostPageMyCollect(int pageNum, int pageSize);

    void incrementLikeCount(String postId);
    void decrementLikeCount(String postId);

    void incrementCollectCount(String postId);
    void decrementCollectCount(String postId);

    void incrementCommentCount(String postId);
    void decrementCommentCount(String postId);

    /**
     * 查询论坛帖子列表
     *
     * @param forumPost 论坛帖子
     * @return 论坛帖子集合
     */
    List<ForumPostVo> selectForumPostList(ForumPost forumPost);

}
